<%@ page import="java.util.Enumeration"%>
<%@ page import="domain.Pet"%>
<%@ page language="java" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<HTML>
<HEAD>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<LINK href="${pageContext.request.contextPath}/admin/css/Style.css"
	type="text/css" rel="stylesheet">
<script language="javascript"
	src="${pageContext.request.contextPath}/admin/js/public.js"></script>
<script language="javascript"
	src="${pageContext.request.contextPath}/admin/js/check.js"></script>

</HEAD>
<script type="text/javascript">
	//设置类别的默认值
	function setPetSpecies(t) {
		var petSpecies = document.getElementById("petSpecies");//得到下拉列表
		
		var ops = petSpecies.options;//得到下拉列表中的所有option标签数组
		for ( var i = 0; i < ops.length; i++) {

			if (ops[i].value == t) {//判断哪一个option选项中的value值与t(当前书的类名称)相等
				ops[i].selected = true;//相等则把selected=selected加上
				return;
			}
		}

	};
</script>
<body 	onload="setPetSpecies('${pet.petSpecies}')">
	<form id="userAction_save_do" name="Form1"
		action="${pageContext.request.contextPath }/pet/updatePetServlet" method="post">
	
	<input type="hidden" name="petId" value="${pet.petId }"/>
		<table cellSpacing="1" cellPadding="5" width="100%" align="center"
			bgColor="#eeeeee" style="border: 1px solid #8ba7e3" border="0">
			<tr>
				<td class="ta_01" align="center" bgColor="#afd1f3" colSpan="4"
					height="26"><strong><STRONG>编辑宠物信息</STRONG> </strong></td>
			</tr>


			<tr>
				<td align="center" bgColor="#f5fafe" class="ta_01">宠物名字：</td>
				<td class="ta_01" bgColor="#ffffff"><input type="text"
					name="petName" class="bg" value="${pet.petName }" />
				</td>
				<td align="center" bgColor="#f5fafe" class="ta_01">宠物品种：</td>
				<td class="ta_01" bgColor="#ffffff"><select name="petSpecies"
					id="petSpecies">
						<option value="" selected="selected">--选择宠物品种--</option>
						<option value="二哈">二哈</option>
						<option value="秋田">秋田</option>
						<option value="边牧">边牧</option>
						<option value="金毛">金毛</option>
						<option value="中华田园犬">中华田园犬</option>
						<option value="英国短毛猫">英国短毛猫</option>
						<option value="招财猫">招财猫</option>
						<option value="大熊猫">大熊猫</option>
						<option value="小龟龟">小龟龟</option>
						<option value="锦鲤">锦鲤</option>
						<option value="辣鸡">辣鸡</option>
						<option value="小黄鸭">小黄鸭</option>
						<option value="火狐">火狐</option>
						<option value="银狐">银狐</option>
				</select>
				</td>
			</tr>
			<tr>
				<td align="center" bgColor="#f5fafe" class="ta_01">宠物生日：</td>
				<td class="ta_01" bgColor="#ffffff"><input type="text"
					name="petBirthday" 
					class="bg" class="bg"  value="${pet.petBirthday }" />
				</td>
				<td align="center" bgColor="#f5fafe" class="ta_01">主人编号：</td>
				<td class="ta_01" bgColor="#ffffff"><input type="text"
					name="ownerId" class="bg" class="bg"   value="${pet.ownerId }"/>
				</td>
			</tr>


			<tr>
				<td align="center" bgColor="#f5fafe" class="ta_01">医生编号：</td>
				<td class="ta_01" bgColor="#ffffff" ><input 
					type="text" name="doctorId" class="bg" size="30" value="${pet.doctorId }"/>
				</td>
				<td align="center" bgColor="#f5fafe" class="ta_01"></td>
				<td class="ta_01" bgColor="#ffffff"></td>
			</tr>
			<TR>
				<TD class="ta_01" align="center" bgColor="#f5fafe">宠物描述：</TD>
				<TD class="ta_01" bgColor="#ffffff" colSpan="3"><textarea
						name="description" cols="30" rows="3" style="WIDTH: 96%">${pet.description }</textarea>
				</TD>
			</TR>
			<TR>
				<td align="center" colSpan="4" class="sep1"><img
					src="${pageContext.request.contextPath}/admin/images/shim.gif">
				</td>
			</TR>


			<tr>
				<td class="ta_01" style="WIDTH: 100%" align="center"
					bgColor="#f5fafe" colSpan="4"><input type="submit"
					class="button_ok" value="确定"> <FONT face="宋体">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT>



					<input type="reset" value="重置" class="button_cancel"> <FONT
					face="宋体">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT> <INPUT
					class="button_ok" type="button" onclick="history.go(-1)" value="返回" />
					<span id="Label1"> </span></td>
			</tr>
		</table>
	</form>




</body>
</HTML>